<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
window.onload=function(){
    var canvas=document.getElementById("canvas");
    var cx=canvas.getContext("2d");
    cx.fillStyle="red";
    cx.strokeStyle="black";
    cx.translate(150,150)
    cx.moveTo(-55,-110);
    cx.lineTo(100,0);
    cx.lineTo(-100,0);
    cx.lineTo(55,-110);
    cx.lineTo(0,80);
    cx.lineTo(-55,-110)
    
    cx.fill()
    cx.stroke();



}
    </script>
</head>
<body>
    <canvas id="canvas" width="500px" height="500px" style="background-color: #ccc;"></canvas>
</body>
</html>